-
Notifications
You must be signed in to change notification settings - Fork 463
(Popup) Enable Popup v2 Inside Custom NavigationPage #2919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses an issue where popups opened inside modal pages fail to display correctly due to navigation bar interference. The fix removes the navigation bar from popup pages and implements proper modal stack traversal to locate and close popups that are wrapped in navigation containers.
Key Changes:
- Explicitly disables the navigation bar for popup pages to prevent UI conflicts
- Adds a
FindPopupPage()method to handle closing popups that are nested within page containers (e.g., NavigationPage) - Removes unused imports to clean up the code
f69560f to
d70a248
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Pedro! Could you add some UnitTests before we merge this?
|
@pictos Is there any way to apply this fix while using the current CommunityToolkit.Maui version 12.3.0 until this fix gets released in a newer version? My project heavily relies on showing modal pages wrapped inside navigation pages, which I can't change at this moment due to the amount of refactoring that will be needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Pedro!
I added a reproduction to the Sample app along with some Unit Tests 🙌
Description of Change
Removed the NavigationBar and make sure the Close will work. When you open a Popup inside a ModalPage the Popup will not show on ModalStack, what shows up is a
NavigationPageand the PopupPage will be itsContent.Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information